package cn.lutu.adapter.controller;

import cn.lutu.dao.mapper.BannerMapper;
import cn.lutu.protocol.vo.BannerVO;
import cn.lutu.util.response.ResultVO;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@Api(tags = "轮播图模块")
@RequestMapping("/v1/banners/")
public class BannerController {
    @Autowired
    BannerMapper bannerMapper;

    @GetMapping("{bannerCategoryId}")
    public ResultVO ArticleBanner(@PathVariable Long bannerCategoryId){
        List<BannerVO> list=bannerMapper.selectArticle(bannerCategoryId);
        return ResultVO.ok(list);
    }

}
